package com.ruoyi.system.service.impl;

import java.util.List;
import cn.hutool.core.util.ObjectUtil;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.vo.AVipRentXcxVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AVipRentMapper;
import com.ruoyi.system.domain.AVipRent;
import com.ruoyi.system.service.IAVipRentService;

/**
 * 求租会员Service业务层处理
 *
 * @author gf
 * @date 2024-11-26
 */
@Service
public class AVipRentServiceImpl implements IAVipRentService {
    @Autowired
    private AVipRentMapper aVipRentMapper;

    /**
     * 查询求租会员
     *
     * @param id 求租会员主键
     * @return 求租会员
     */
    @Override
    public AVipRent selectAVipRentById(Long id) {
        return aVipRentMapper.selectAVipRentById(id);
    }

    /**
     * 查询求租会员列表
     *
     * @param aVipRent 求租会员
     * @return 求租会员
     */
    @Override
    public List<AVipRent> selectAVipRentList(AVipRent aVipRent) {
        return aVipRentMapper.selectAVipRentList(aVipRent);
    }

    /**
     * 新增求租会员
     *
     * @param aVipRent 求租会员
     * @return 结果
     */
    @Override
    public int insertAVipRent(AVipRent aVipRent) {
        aVipRent.setCreateTime(DateUtils.getNowDate());
        return aVipRentMapper.insertAVipRent(aVipRent);
    }

    /**
     * 修改求租会员
     *
     * @param aVipRent 求租会员
     * @return 结果
     */
    @Override
    public int updateAVipRent(AVipRent aVipRent) {
        aVipRent.setUpdateTime(DateUtils.getNowDate());
    return aVipRentMapper.updateAVipRent(aVipRent);
    }

    /**
     * 批量删除求租会员
     *
     * @param ids 需要删除的求租会员主键
     * @return 结果
     */
    @Override
    public int deleteAVipRentByIds(Long[] ids) {
        return aVipRentMapper.deleteAVipRentByIds(ids);
    }

    /**
     * 删除求租会员信息
     *
     * @param id 求租会员主键
     * @return 结果
     */
    @Override
    public int deleteAVipRentById(Long id) {
        return aVipRentMapper.deleteAVipRentById(id);
    }

    /**
     * 批量逻辑删除求租会员
     *
     * @param ids 需要删除的求租会员主键
     * @return 结果
     */
    @Override
    public int logicDeleteAVipRentByIds(Long[] ids) {
        return aVipRentMapper.logicDeleteAVipRentByIds(ids);
    }
    /**
     * 逻辑删除求租会员信息
     *
     * @param id 求租会员主键
     * @return 结果
     */
    @Override
    public int logicDeleteAVipRentById(Long id) {
        return aVipRentMapper.logicDeleteAVipRentById(id);
    }

    @Override
    public List<AVipRentXcxVO> selectAVipRentXcxList() {
        return aVipRentMapper.selectAVipRentXcxList();
    }

}
